Advanced Architecting on AWS
CloudFront โข Lambda@Edge โข Local Zones โข Wavelength โข IoT
| Feature | CloudFront Functions | Lambda@Edge |
|---|---|---|
| Runtime | JavaScript only | Node.js, Python |
| Execution time | <1 ms | Up to 5s (viewer) / 30s (origin) |
| Memory | 2 MB | 128โ10,240 MB |
| Network access | No | Yes |
| Trigger points | Viewer request/response only | All 4 trigger points |
| Scale | Millions of RPS | Thousands of RPS |
| Use case | URL rewrites, header manipulation, redirects | A/B testing, auth, image resize, origin selection |
| Cost | 1/6th the cost of Lambda@Edge | Higher (Lambda pricing) |
Local Zones
AWS infrastructure in metropolitan areas. Single-digit ms latency to nearby users. EC2, EBS, ECS, EKS available. Connected to parent Region.
Wavelength Zones
AWS compute inside 5G telecom networks. Ultra-low latency for mobile/IoT. EC2, EBS available. Accessed via carrier gateway.
# Create Origin Access Control aws cloudfront create-origin-access-control \ --origin-access-control-config '{"Name":"MyOAC", "SigningProtocol":"sigv4","SigningBehavior":"always", "OriginAccessControlOriginType":"s3"}' # Create CloudFront invalidation aws cloudfront create-invalidation \ --distribution-id E1234567890 \ --paths "/*" # List CloudFront distributions aws cloudfront list-distributions \ --query 'DistributionList.Items[].{Id:Id,Domain:DomainName,Status:Status}'
Q1: A website needs to add security headers (X-Frame-Options, CSP) to all responses at minimal cost and maximum scale. What should they use?
A) Lambda@Edge viewer response B) CloudFront Functions viewer response C) ALB response headers D) WAF custom rules
Q2: A mobile gaming company needs <5ms latency for players connected via 5G networks. Which AWS service should they use?
A) CloudFront B) Local Zones C) Wavelength Zones D) Global Accelerator
CloudFront
600+ PoPs. Behaviors for path routing. OAC (not OAI). Cache/Origin request policies. Origin failover.
Edge Compute
CF Functions (simple, fast, cheap). Lambda@Edge (complex, network access). Choose by complexity.
Extended Infrastructure
Local Zones (metro low-latency). Wavelength (5G). Outposts (on-premises). IoT Greengrass (devices).
Decision Guide
Web content โ CloudFront. Metro apps โ Local Zones. 5G mobile โ Wavelength. Data center โ Outposts.